package com.dyna.listener;

import lombok.extern.slf4j.Slf4j;
import org.springframework.data.redis.connection.Message;
import org.springframework.data.redis.connection.MessageListener;
import org.springframework.stereotype.Component;

import javax.validation.constraints.NotNull;

@Slf4j
@Component
public class RedisMessageListenerAdapter implements MessageListener {

    @Override
    @NotNull
    public void onMessage(Message message, byte[] bytes) {
        log.info("redis发布订阅接收到的消息:{}", message);
    }

}
